#pragma once

class TutorialHandler : public Singleton<TutorialHandler>
{
	TutorialFrame* m_tutFrame;
	TutorialNotify* m_notify;
	bool m_tutShown[NUM_TUTORIALS];
public:
	TutorialHandler();
	void ShowTutorial(std::string szTitle, std::string szText)
	{
		m_tutFrame->SetText(szText);
		m_tutFrame->szTitle = szTitle;
		m_notify->m_visible = true;
		m_notify->FadeIn();
	}

	bool TutorialShown(Tutorials tut)
	{
		if(tut >= NUM_TUTORIALS)
			return true;
		if(!m_tutShown[tut])
		{
			m_tutShown[tut] = true;
			return false;
		}
		return true;
	}

	void HideNotify()
	{
		m_notify->FadeOut();
	}
	
	void ShowTutorial()
	{
		m_tutFrame->m_visible = true;
	}

	void HideTutorial()
	{
		m_tutFrame->m_visible = false;
	}

	void Resize()
	{
		m_notify->Resize();
	}
};

#define sTutorial (*TutorialHandler::GetInstance())